﻿namespace TriangleGames.TrainRes
{
    using System;
    using UnityEngine;

    [Serializable]
    public class FsmBool : NamedVariable
    {
        [SerializeField]
        private bool value;

        public FsmBool()
        {
        }

        public FsmBool(FsmBool toCopy) : base(toCopy.Name)
        {
            this.value = toCopy.value;
        }

        public FsmBool(string name) : base(name)
        {
        }

        public static implicit operator FsmBool(bool value)
        {
            FsmBool bool2 = new FsmBool(string.Empty);
            bool2.value = value;
            return bool2;
        }

        public override string ToString()
        {
            return this.value.ToString();
        }

        public bool Value
        {
            get
            {
                return this.value;
            }
            set
            {
                this.value = value;
            }
        }
    }
}

